﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace SHKF.B2C.Model.Entity
{
    public class BaseEntity : ICloneable, INotifyPropertyChanged
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public long SN { get; set; }

        public object Clone()
        {
            return this.MemberwiseClone();
        }

        #region UI更新接口
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void OnPropertyChanged(string propertyName = null)
        {
            if (PropertyChanged != null)
                PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
        #endregion
    }
}
